
import request from '@shared/apis/request';

/**
 * 用户登录
 * @param username 用户吗
 * @param password 密码
 */
export async function post(username: string, password: string) {
    const url = '/users/login';
    const body = await request.post<{ token: string }>(url, { username, password });
    return body.data;
}